package org.jeecg.modules.xxgx.common.enums;

/**
 * 发票类型代码枚举类型
 */
public enum FplxdmEnum {
    sdzp ("数电专票","01"),
    sdpp ("数电普票","02"),
    zzszp ("增值税专票","004"),
    zzsjdcfp ("增值税机动车发票","005"),
    zzsescfp ("增值税二手车发票","006"),
    zzspp ("增值税普票","007"),
    zzsjsfp ("增值税卷式发票","025"),
    dzpp ("电子普票","026"),
    dzzp ("电子专票","028");
    private final String desc;//描述
    private final String value;//值
    FplxdmEnum(String desc, String value) {
        this.desc = desc;
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public String getValue() {
        return value;
    }

    public static String getDescByValue(String value) {
        for(FplxdmEnum fplxdmEnum : FplxdmEnum.values()){
            if(fplxdmEnum.getValue().equalsIgnoreCase(value)){
                return fplxdmEnum.getDesc();
            }
        }
        return null;
    }
    public static String getValueByDesc(String desc) {
        for(FplxdmEnum fplxdmEnum : FplxdmEnum.values()){
            if(fplxdmEnum.getDesc().equalsIgnoreCase(desc)){
                return fplxdmEnum.getValue();
            }
        }
        return null;
    }

}
